﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace System.Collections.Generic
{
#if NETFX4_0
	public interface IReadOnlyDictionary<TKey, TValue> : IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable
	{
		// Summary:
		//     Gets an enumerable collection that contains the keys in the read-only dictionary.
		//
		// Returns:
		//     An enumerable collection that contains the keys in the read-only dictionary.
		IEnumerable<TKey> Keys { get; }
		//
		// Summary:
		//     Gets an enumerable collection that contains the values in the read-only dictionary.
		//
		// Returns:
		//     An enumerable collection that contains the values in the read-only dictionary.
		IEnumerable<TValue> Values { get; }

		// Summary:
		//     Gets the element that has the specified key in the read-only dictionary.
		//
		// Parameters:
		//   key:
		//     The key to locate.
		//
		// Returns:
		//     The element that has the specified key in the read-only dictionary.
		//
		// Exceptions:
		//   System.ArgumentNullException:
		//     key is null.
		//
		//   System.Collections.Generic.KeyNotFoundException:
		//     The property is retrieved and key is not found.
		TValue this[TKey key] { get; }

		// Summary:
		//     Determines whether the read-only dictionary contains an element that has
		//     the specified key.
		//
		// Parameters:
		//   key:
		//     The key to locate.
		//
		// Returns:
		//     true if the read-only dictionary contains an element that has the specified
		//     key; otherwise, false.
		//
		// Exceptions:
		//   System.ArgumentNullException:
		//     key is null.
		bool ContainsKey(TKey key);
		//
		// Summary:
		//     Gets the value that is associated with the specified key.
		//
		// Parameters:
		//   key:
		//     The key to locate.
		//
		//   value:
		//     When this method returns, the value associated with the specified key, if
		//     the key is found; otherwise, the default value for the type of the value
		//     parameter. This parameter is passed uninitialized.
		//
		// Returns:
		//     true if the object that implements the System.Collections.Generic.IReadOnlyDictionary<TKey,TValue>
		//     interface contains an element that has the specified key; otherwise, false.
		//
		// Exceptions:
		//   System.ArgumentNullException:
		//     key is null.
		bool TryGetValue(TKey key, out TValue value);
	}

	// Summary:
	//     Represents a strongly-typed, read-only collection of elements.
	//
	// Type parameters:
	//   T:
	//     The type of the elements.This type parameter is covariant. That is, you can
	//     use either the type you specified or any type that is more derived. For more
	//     information about covariance and contravariance, see Covariance and Contravariance
	//     in Generics.
	public interface IReadOnlyCollection<out T> : IEnumerable<T>, IEnumerable
	{
		// Summary:
		//     Gets the number of elements in the collection.
		//
		// Returns:
		//     The number of elements in the collection.
		int Count { get; }
	}
#endif
}
